package app.modules.account.persistence.mapper;

import app.modules.security.dto.web.role.WebRoleDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jasmine.security.rbac.model.SecUserRoleRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mh.z
 */
public interface UserRoleRelationMapper extends BaseMapper<SecUserRoleRelation> {

    /**
     * 查询指定用户的所有已分配角色
     *
     * @param userId
     * @return
     */
    List<WebRoleDTO> listAssignedRoles(@Param("userId") Long userId);
}
